/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.siseventos.view.util;

import java.util.Map;
import java.util.Map.Entry;
import org.primefaces.context.RequestContext;

/**
 *
 * @author marcosnatanpacheco
 */
public class CallbackHelper {
    
    public static void addCallback(String chave, Object valor){
        RequestContext rc = RequestContext.getCurrentInstance();
        rc.addCallbackParam(chave, valor);
        
    }
    public static void addCallback(Map<String, Object> params){
        RequestContext rc = RequestContext.getCurrentInstance();
        for(Entry e: params.entrySet()){
            rc.addCallbackParam(e.getKey().toString(), e.getValue());
        }
        
    }
}
